package com.sctvcloud.zhaohua_sd.ui.activities;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.zhaohua_sd.R;
import com.sctvcloud.zhaohua_sd.application.SiChuanFocusApplication;
import com.sctvcloud.zhaohua_sd.base.BaseActivity;
import com.sctvcloud.zhaohua_sd.ui.utils.SkipUtil;
import com.sctvcloud.zhaohua_sd.ui.utils.TitleUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 兑换成功
 */
public class CommodityExchangeSuccessActivity extends BaseActivity {
    @BindView(R.id.title_top_title)
    protected CustomFontTextView title;
    @BindView(R.id.title_top_edit)
    protected CustomFontTextView rightEdit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        rightEdit.setText("完成");
        title.setText(R.string.redeem_success);
        SkipUtil.skipToAddUserOperate( this, getOwnerName(),  16, 0, "兑换商品成功", "", "" );
    }

    @Override
    protected void initInject() {
        setContentView(R.layout.activity_commodity_exchange_success);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.title_top_edit, R.id.to_check_convert_record})
    protected void click(View v) {
        if (v.getId() == R.id.title_top_edit) {
            finish();
        } else if (v.getId() == R.id.to_check_convert_record) {
            Intent intent = new Intent(this, RedemptionRecordActivity.class);
            startActivity(intent);
        }
    }

}
